package com.laiketui.order.controlller;

import com.laiketui.domain.vo.OrderVo;
import com.laiketui.order.service.SeataDemoService;
import com.laiketui.root.annotation.HttpApiMethod;
import com.laiketui.core.domain.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/seatademo")
public class SeateDemoController {

    private final Logger logger = LoggerFactory.getLogger(SeateDemoController.class);

    @Autowired
    SeataDemoService seataDemoService;

    @RequestMapping("/seataDemo")
    @HttpApiMethod(urlMapping = {"app.order.seataDemo"})
    public Result settlement(OrderVo vo) throws Exception {
        try {
            return Result.success(seataDemoService.seataDemoMethod());
        } catch (Exception e) {
            throw e;
        }
    }

}
